package co.yixiang.modules.user.service.mapper;

import co.yixiang.common.mapper.CoreMapper;
import co.yixiang.modules.user.domain.MonthlyManagementAward;
import co.yixiang.modules.user.vo.BillVo;
import co.yixiang.modules.user.vo.MonthlyAwardDetailVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author lsh
* @date 2021-05-12
*/
@Repository
public interface MonthlyManagementAwardMapper extends CoreMapper<MonthlyManagementAward> {

    @Select(" SELECT * " +
            " FROM monthly_management_award  " +
            " where (uid=#{uid} or parent_id =#{uid}) and month=#{month} and is_open =1 and status =1 " +
            "order by create_time desc  ")
    List<MonthlyManagementAward> getManagementAward4monthList(Page page, @Param("uid") Long uid, @Param("month") String month);


}
